package com.example.transaction.controller;

import com.example.transaction.service.bussiness.IStepFlowService;
import com.example.transaction.vo.StepStateVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Scope("request")
@RequestMapping("/step")
public class StepFlowController {

    @Autowired
    private IStepFlowService stepFlowService;

    @PostMapping("/status")
    private String flow(@RequestBody StepStateVO stepStateVO) {
        stepFlowService.flow(stepStateVO);
        return "success";
    }
}
